<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>演示</title>
    <style>

        .div1{
            width: 300px;
            height: 300px;
            background-color: darkturquoise;
            position: relative;
            float: left;
        }

        .div2{
            width: 200px;
            height: 200px;
            background-color: firebrick;
            position:absolute;
            top:300px
        }

        
    </style>
</head>
<body>
   <div class="div1">
       <div class="div2"></div>
   </div>
</body>
</html>